package cloud.simple.service.web;


import cloud.simple.service.domain.SysAdminUserService;
import cloud.simple.service.model.SysAdminUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Hello world!
 */
@RestController
@EnableAutoConfiguration
public class HelloWorldController {

    @Autowired
    private SysAdminUserService sysAdminUserService;

    @RequestMapping("/hello")
    public String sayHello() {
        return "启动成功了！！";
    }

    @GetMapping(value = "list")
    public List<SysAdminUser> list() {
        List<SysAdminUser> sysAdminUsers = sysAdminUserService.selectAll();
        return sysAdminUsers;
    }

}
